write a python program to count the number of words in a text file